package com.springbootblog.service.fontend;

import org.elasticsearch.client.RestHighLevelClient;

import java.io.IOException;
import java.util.Map;

public interface ElasticsearchService
{
    Map<String, Object> createIndex(String indexName) throws IOException;

    Map<String, Object> indexIsExists(String indexName) throws IOException;

    Map<String, Object> deleteIndex(String indexName) throws IOException;

    Map<String, Object> addDocument(String id, String indexName, String time) throws IOException;

    Map<String, Object> getDocument(String indexName, String id) throws Exception;

    Map<String, Object> documentIsExists(String indexName, String id) throws Exception;

    Map<String, Object> updateDocument(String indexName, String id) throws Exception;

    Map<String, Object> deleteDocument(String indexName, String id, String time) throws Exception;

    Map<String, Object> mapSearch(String indexName, String time, String searchString,Integer page, String[] field) throws Exception;

    Map<String, Object> batchAddData(String time, String indexName) throws Exception;



}
